<?php if (!defined('THINK_PATH')) exit(); global $isLogin;?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title><?=C('APP_NAME')?>-后台管理系统</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="stylesheet" type="text/css" href="/statics/lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/statics/stylesheets/theme.css">
    <link rel="stylesheet" href="/statics/lib/font-awesome/css/font-awesome.css">

	<script src="/statics/arts/artDialog.source.js?skin=default"></script>
	<script src="/statics/arts/iframeTools.source.js"></script>
	<script src="/statics/lib/jquery-1.7.2.min.js" type="text/javascript"></script>
	<script src="/statics/js/base.js" type="text/javascript"></script>
	<script type="text/javascript" src="/statics/lib/WdatePicker.js"></script>
	<link rel="stylesheet" href='/statics/css/lightbox.css'></link>
	<script type="text/javascript" src='/statics/js/lightbox.js'></script>
    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>
    
    <style>
		form {
			margin: 0;
		}
		textarea {
			display: block;
		}
		table {
	 		border:1px solid #dddddd
		}
	</style>
	<link rel="stylesheet" href="/statics/lib/themes/default/default.css" />
	<script charset="utf-8" src="/statics/lib/kindeditor-min.js"></script>
	<script charset="utf-8" src="/statics/lib/lang/zh_CN.js"></script>
	<script>
		var editor;
		KindEditor.ready(function(K) {
			editor = K.create('textarea[name="content"]', {
				allowFileManager : true,
				afterBlur:function(){
					   this.sync();
					},
			});
			K('input[name=getHtml]').click(function(e) {
				alert(editor.html());
			});
			K('input[name=isEmpty]').click(function(e) {
				alert(editor.isEmpty());
			});
			K('input[name=getText]').click(function(e) {
				alert(editor.text());
			});
			K('input[name=selectedHtml]').click(function(e) {
				alert(editor.selectedHtml());
			});
			K('input[name=setHtml]').click(function(e) {
				editor.html('<h3>Hello KindEditor</h3>');
			});
			K('input[name=setText]').click(function(e) {
				editor.text('<h3>Hello KindEditor</h3>');
			});
			K('input[name=insertHtml]').click(function(e) {
				editor.insertHtml('<strong>插入HTML</strong>');
			});
			K('input[name=appendHtml]').click(function(e) {
				editor.appendHtml('<strong>添加HTML</strong>');
			});
			K('input[name=clear]').click(function(e) {
				editor.html('');
			});
		});
	</script>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!-->
  <script src="/statics/js/sever_top_side.js" type="text/javascript"></script>
  <body>
		  
<?php if($isLogin && !I('get.ifm')){?>
<body class=""> 
  <!--<![endif]-->
  	<p style="width:0%;border:2px solid pink;margin:0px;position:absolute;top:0px;left:0px;z-index:100000" id="loadIngCent"></p>
    <div class="navbar" id="loadIngCent_navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                    <!--<li><a href="#" class="hidden-phone visible-tablet visible-desktop ifrm" data-url="/sysmsg/showlogs" data-width="900" data-height="650" data-title="系统日志" data-params="" role="button">系统日志</a></li>-->
                    <li id="fat-menu" class="dropdown">
                        <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="/statics/images/addpic.png" alt="">
                            <?=getLoginMsg()->username?>
                            <i class="icon-caret-down"></i>
                        </a>
                        
                        <ul class="dropdown-menu">
                            <li><a tabindex="-1" href="javascript:void(0)" id="myaccount" class="ifrm" data-url="/user/usercenter" data-width="450" data-height="450" data-title="我的账户" data-params="">我的账户</a></li>
                            <!--<li><a tabindex="-1" class="visible-phone" href="#">系统设置</a></li>-->
                            <li><a tabindex="-1"  href="/user/addAdmin" >新开帐号</a></li>
                            <li><a tabindex="-1" href="/user/loginout">注销</a></li>
                        </ul>
                    </li>
                </ul>
                <a class="brand" href="/user/loginout">
                    <img src="/statics/images/logo.png" alt=""><!--width: 18.5%;margin-right: .5em;vertical-align: -0.33333rem;-->
                    <span class="second">铜人宝医院安全管理系统</span>
                </a>
        </div>
    </div>
    <script>loadCent('20%',100);</script>
    <div class="sidebar-nav" id="sidebar-nav">
        <!--医院内部管理-->
		<a href="#accounts-menu-first-01" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_hospital.png" alt="">
            <span>医院内部管理</span>
            <img class="define-left" src="/statics/images/secer_left.png" alt="">
        </a>
		<ul id="accounts-menu-first-01"  class="accounts-menu-first-ul nav nav-list collapse">
            <li class="active">
                <a href="#accounts-menu-second-01" class="active-two accounts-menu-two-ul" data-toggle="collapse">科室管理</a>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-02" class="active-two accounts-menu-two-ul" data-toggle="collapse">人员管理</a>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-03" class="active-two accounts-menu-two-ul" data-toggle="collapse">患者管理</a><img class="define-left" src="/statics/images/secer_left.png" alt="">
                <ul id="accounts-menu-second-03"  class="nav nav-list collapse">
                    <li class="active active-three"><a href="javascript:;">患者账号管理</a></li>
                    <li class="active active-three"><a href="javascript:;">腕带管理</a></li>
                </ul>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-04" class="active-two accounts-menu-two-ul" data-toggle="collapse">黑名单管理</a><img class="define-left" src="/statics/images/secer_left.png" alt="">
                <ul id="accounts-menu-second-04"  class="nav nav-list collapse">
                    <li class="active active-three"><a href="javascript:;">黑名单管理</a></li>
                    <li class="active active-three"><a href="javascript:;">权限管理</a></li>
                </ul>
            </li>
		</ul>

        <!--服务中心-->
        <a href="#accounts-menu-first-02" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_center.png" alt="">
            <span>服务中心</span>
            <img class="define-left" src="/statics/images/secer_left.png" alt="">
        </a>
        <ul id="accounts-menu-first-02"  class="accounts-menu-first-ul nav nav-list collapse">
            <li class="active">
                <a href="#accounts-menu-second-01" class="active-two accounts-menu-two-ul" data-toggle="collapse">患者呼叫</a>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-02" class="active-two accounts-menu-two-ul" data-toggle="collapse">院内呼叫</a>
            </li>
        </ul>

        <!--预警管理-->
        <a href="#accounts-menu-first-03" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_warning.png" alt="">
            <span>预警管理</span>
            <img class="define-left" src="/statics/images/secer_left.png" alt="">
        </a>
        <ul id="accounts-menu-first-03"  class="accounts-menu-first-ul nav nav-list collapse">
            <li class="active">
                <a href="#accounts-menu-second-01" class="active-two accounts-menu-two-ul" data-toggle="collapse">预警处理</a>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-02" class="active-two accounts-menu-two-ul" data-toggle="collapse">报警信号</a>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-04" class="active-two accounts-menu-two-ul" data-toggle="collapse">报警卡绑定记录</a>
            </li>
        </ul>

        <!--投诉管理-->
        <a href="#accounts-menu-first-04" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_complaint.png" alt="">
            <span>投诉管理</span>
            <img class="define-left" src="/statics/images/secer_left.png" alt="">
        </a>
        <ul id="accounts-menu-first-04"  class="accounts-menu-first-ul nav nav-list collapse">
            <li class="active">
                <a href="#accounts-menu-second-04-01" class="active-two accounts-menu-two-ul" data-toggle="collapse">患者投诉</a><img class="define-left" src="/statics/images/secer_left.png" alt="">
                <ul id="accounts-menu-second-04-01"  class="nav nav-list collapse">
                    <li class="active active-three"><a href="javascript:;">投诉汇总</a></li>
                    <li class="active active-three"><a href="javascript:;">投诉参数设置</a></li>
                </ul>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-04-02" class="active-two accounts-menu-two-ul" data-toggle="collapse">院内投诉</a><img class="define-left" src="/statics/images/secer_left.png" alt="">
                <ul id="accounts-menu-second-04-02"  class="nav nav-list collapse">
                    <li class="active active-three"><a href="javascript:;">投诉汇总</a></li>
                    <li class="active active-three"><a href="javascript:;">投诉参数设置</a></li>
                </ul>
            </li>
        </ul>

        <!--后勤管理-->
        <a href="#accounts-menu-first-05" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/secer_logi.png" alt="">
            <span>后勤管理</span>
        </a>

        <!--资产管理-->
        <a href="#accounts-menu-first-06" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/secer_property.png" alt="">
            <span>资产管理</span>
        </a>

        <!--公告管理-->
        <a href="#accounts-menu-first-07" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_announcements.png" alt="">
            <span>公告管理</span>
        </a>

        <!--管理账号管理-->
        <a href="#accounts-menu-first-08" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_account.png" alt="">
            <span>管理账号管理</span>
        </a>

    </div>
    <script>loadCent('30%',100);</script>
    <div class="content">
        <div class="header">
        	<!-- 
			<div class="stats">
				<p class="stat"><span class="number"><?=session('tj_life_regist')?></span>今日注册数</p>
				<p class="stat"><span class="number"><?=session('tj_life_port')?></span>今日订单数</p>
			</div> -->
			<!--<h1 class="page-title"><?=C('menus')[$_current_c[0]][$_current_c[1]]['tip']?></h1> -->
        </div>

        <div class="container-fluid">
            <div class="row-fluid">
            <script>
                loadCent('60%',100);
                height_loadIngCent_navbar();
                function height_loadIngCent_navbar() {
                    $('#sidebar-nav').css('top',$('#loadIngCent_navbar').outerHeight())
                }
                $(window).resize(function () {
                    height_loadIngCent_navbar();
                })
            </script>
<?php }?>
 <style>
    input[type="text"]{
        margin: 0;
    }
    .define{
        background-color: #f6f6f6;
    }
    .container-fluid{
        padding: 0;
    }
    .define-nav{
        background-color: #FFF;
        padding: 0.39393939rem 0 0.39393939rem 0.848484rem;
    }
    .define-nav .pull-left{
        color: #666;
        display: inline-block;
        font-size: 0.54rem;
        margin-top:6px;
    }
    .define-nav .pull-right{
        margin-right: 0.909090rem;
    }
    #admin_search_people,
    #admin_add_people{
        width: 3.272727rem;
    }
    .define-nav-input{
        margin-top: 0.87878787rem;
        margin-left: 0.909090rem;
        background-color: #FFF;
        padding:  0.757575rem 0;
        margin-right: 0.909090rem;
    }
    .define-nav-input .pull-right{
        margin-right: 0.909090rem;
    }
    .define-nav-input .define-table-input:nth-child(1){
        padding-left: 0.60606060rem;
    }
    .define-nav-input .define-table-input:nth-child(3),
    .define-nav-input .define-table-input:nth-child(2){
        padding-left: 1.818181rem;
    }
    .define-nav-input span{
        font-size: 0.424242rem;
        display: inline-block;
        margin-top: 1px;
    }
    .define-nav-input input{
        margin: 0;
        padding: 0.1rem 0.2rem;
        width: 7.878787rem;
        height: 0.727272rem;
        line-height: normal;
        font-size: 0.424242rem;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
        border-color: #E6E6E6;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
    }
    .define-nav-input input::-webkit-input-placeholder {
        font-size: 1px;
        line-height: 1;
    }
    .define-nav-input input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
        font-size: 0.2rem;
        line-height: 2.2;
    }
    .define-nav-input input::-moz-placeholder { /* Mozilla Firefox 19+ */
        font-size: 0.2rem;
        line-height: 2.2;
    }
    .define-nav-input input:-ms-input-placeholder { /* Internet Explorer 10+ */
        font-size: 0.2rem;
        line-height: 2.2;
    }
    .define-table-input button{
        background-color: #F7F9FA;
        border: 1px solid #E6E6E6;
        color: #999;
        height: 1.03rem;
        line-height: 0.606060rem;
        padding-left: 0.303030rem;
        padding-right: 0.303030rem;
        font-size: 0.424242rem;
        border-radius: 3px;
    }
    .define-table-input button i{
        padding-left: 1.333333rem;
    }
    .define-table-input button:focus,
    .define-table-input button:active,
    .define-table-input button:hover{
        border: 1px solid #E6E6E6;
    }
    .define-table{
        margin-left: 0.9090909rem;
        margin-right: 0.9090909rem;
    }
    .table{
        border-radius: 3px;
        margin-bottom: 0;
        border: 1px solid #E6E6E6;
        font-size: 0.424242rem;
    }
    .table thead{
        background-color: #FAFAFA;
        color: #999;
    }
    .table tr{
        padding-left: 0.606060rem;
    }
    .table td{
        border-top: 1px solid #E6E6E6;
        border-bottom: 1px solid #E6E6E6;
        padding: 0.51515151rem 0.242424rem;
        line-height: 1.2;
    }
    .table tbody{
        background-color: #FFF;
    }
    .table tbody td{
        vertical-align: bottom;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .table tbody tr td.clearfix:last-child{
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
    }
    .table tbody tr td.clearfix:last-child .pull-left{
        padding: 0.1rem 0.2rem ;
    }
    .table tbody tr td.clearfix:last-child .pull-left:hover{
        background-color: #e6e6e6;
        border-radius: 2px;
    }
    .table-hover tbody tr:hover td{
        background-color: #fafafa;
    }
    .table tbody td:nth-child(4) img{
        width: 1.212121rem;
        vertical-align: -1px;
        -webkit-border-radius: 50%;
        -moz-border-radius: 50%;
        border-radius: 50%;
    }
    td.clearfix img{
        width: 0.393939rem;
        vertical-align: -2px;
        margin-right: 5px;
    }
    td.clearfix div:nth-child(2),
    td.clearfix div:nth-child(3){
        margin-left: 0.606060rem;
    }
    /*td.clearfix div{
        background-color: #E6E6E6;
        padding: 3px 5px;
    }*/
    .define-paging{
        margin-top: 0.6363rem;
        display: block;
        color: #999;
        font-size: 0.363636rem;
        text-align: center;
    }
    /*改变鼠标悬浮样式  ↓*/
    .table tbody tr td.clearfix:last-child .pull-left:hover,
    #department_modal_delete .clearfix div,
    .define-paging .pull-left:not(:first-child){
        cursor: pointer;
    }
    /*改变鼠标悬浮样式  ↑*/
    .define-paging .pull-left{
        padding: 0 0.272727rem;
    }
    .define-page.define-active{
        color: #47489A;
    }
    .define-paging .pull-left:first-child{
        margin-left: 38%;
        letter-spacing: 0.2rem;
    }
    /*选择科室*/
    .dropdown-menu{
        font-size: 0.42424242rem;
        text-align: center;
        left: 27%;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
        min-width: 72%;
        padding: 0;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
    }
    .dropdown-menu li{
        line-height: 1;
        padding: 5px 0;
    }
    .dropdown-menu li:hover{
        background-color: #E6E6E6;
    }

    /*弹窗*/
    /*层级关系*/
    .define-modal-close {
        position: absolute;
        border: none;
        right: 0.636363rem;
        font-size: 1em;
        font-weight: 100;
    }
    .define-modal-close img{
        width: 12px;
        vertical-align: -2px;
    }
    .define-modal-close img:hover{
        -webkit-animation: img_hover_rotate .2s linear;
        -o-animation: img_hover_rotate .2s linear;
        animation: img_hover_rotate .2s linear;
    }
    @-webkit-keyframes img_hover_rotate {
        0%{  -webkit-transform: rotate(0deg);  }
        100%{  -webkit-transform: rotate(90deg);  }
    }
    @-o-keyframes img_hover_rotate {
        0%{  -o-transform: rotate(0deg);  }
        100% {  -o-transform: rotate(90deg);  }
    }
    @-ms-keyframes img_hover_rotate {
        0%{  -ms-transform: rotate(0deg);  }
        100%{  -ms-transform: rotate(90deg);  }
    }
    @-moz-keyframes img_hover_rotate {
        0%{  -moz-transform: rotate(0deg);  }
        100%{  -moz-transform: rotate(90deg);  }
    }
    @-khtml-keyframes img_hover_rotate {
        0%{  -khtml-transform: rotate(0deg);  }
        100%{  -khtml-transform: rotate(90deg);  }
    }
    @keyframes  img_hover_rotate{
        0%{  transform: rotate(0deg);  }
        100%{  transform: rotate(90deg);  }
    }
    .modal-backdrop, .modal-backdrop.fade.in{
        opacity: 0.5;
    }
    .modal{
        width: 43%;
        left: 45%;
        min-width: 605px;
        margin: 0;
        border: none;
        -webkit-border: none;
    }
    .modal-body,.modal-header{
        font-size: 12px;
    }
    .modal-header{
        padding: 0.31rem 0.636363rem;
        background-color: #FAFAFA;
        color: #1CC7BD;
    }
    .modal .table{
        border: none;
    }
    .modal .table>tbody>tr>td{
        padding: 0;
        vertical-align: middle;
        border: none;
        font-size: 12px;
    }
    .modal input{
        width: 98%;
        height: 0.8rem;
        border-radius: 3px;
        border: 1px solid #e6e6e6;
        -webkit-box-shadow: none;
        box-shadow: none;
    }
    .modal input:-moz-placeholder {
        color: #C9C8C8;
        font-size: 12px;
    }
    .modal input:-ms-input-placeholder{
        color: #C9C8C8;
        font-size: 12px;
    }
    .modal input::-webkit-input-placeholder{
        color: #C9C8C8;
        font-size: 12px;
    }
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(2),
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(3){
        position: relative;
    }
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) div,
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) div{
        border: 1px solid #e6e6e6;
        width: 94%;
        padding: 0.33924rem 6px;
        border-radius: 3px;
    }
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) img,
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) img{
        position: absolute;
        top: 42%;
        right: 6px;
    }
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) img{
        right: 12px;
    }
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) div{
        margin-left: 1.8%;
    }
    .modal .table>tbody>tr>td:first-child{
        width: 76px!important;
        padding-right: 5px;
        text-align: right;
    }
    .modal-body > .clearfix > div{
        width: 50%;
        margin-top: 0.57575757rem;
    }
    .modal-body > .clearfix div div{
        background-color: #1CC7BD;
        color: #FFF;
        text-align: center;
        width: 23%;
        border-radius: 3px;
        padding: 0.1666666rem 0;
    }
    .modal-body > .clearfix div div:hover{
        cursor: pointer;
        background-color: #18ADA4;
    }
    .modal-body > .clearfix div:first-child div{
        margin-left: 74%;
    }
    .modal-body > .clearfix div:last-child div{
        margin-left: 3%;
    }
    /*选择科室级别默认样式  请选择科室  及选择一级科室样式  一级科室*/
    .modal_select_admin{
        color: #C9C8C8;
    }
    .modal_select_admin.active{
        color: #333;
    }
    /*默认选择科室 及 一级科室 样式*/
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_list_default{
        background-color: #FFF;
        padding: 0;
        position: absolute;
        width: 99.8%;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        display: none;
        border-top: none;
    }
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_list_default.active{
        display: block;
    }
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_list_default div{
        width: 98.3%;
        border: none;
        color: #333;
        border-radius: 0;
    }
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_list_default div.active,
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_list_default div.active:hover{
        background-color: #e6e6e6;
    }
    .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_list_default div:hover{
        background-color: #FAFAFA;
    }
    #modal_table_default,#modal_table_second{
        display: none;
    }
    #modal_table_default.active,#modal_table_second.active{
        display: block;
    }
    .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_please_second_list,
    .table>tbody>tr:nth-child(3)>td:nth-child(3) div#modal_select_admin_specific_list{
        padding: 0;
        position: absolute;
        background-color: #FFF;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        width:95.5%;
        border-top: none;
    }
    .table>tbody>tr:nth-child(3)>td:nth-child(3) div#modal_select_admin_specific_list div,
    .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_please_second_list div{
        margin: 0;
        border: none;
        border-radius: 0;
        width: 96.3%;
    }
    .table>tbody>tr:nth-child(3)>td:nth-child(3) div#modal_select_admin_specific_list div:hover,
    .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_please_second_list div:hover{
        background-color: #FAFAFA;
    }
    .table>tbody>tr:nth-child(3)>td:nth-child(3) div#modal_select_admin_specific_list div.active,
    .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_please_second_list div.active,
    .table>tbody>tr:nth-child(3)>td:nth-child(3) div#modal_select_admin_specific_list div.active:hover,
    .table>tbody>tr:nth-child(3)>td:nth-child(2) div#modal_select_admin_please_second_list div.active:hover{
        background-color: #e6e6e6;
    }
    #modal_select_admin_specific_list,#modal_select_admin_please_second_list{
        display: none;
    }
    #modal_select_admin_specific_list.active,#modal_select_admin_please_second_list.active{
        display: block;
    }
    #modal_select_admin_specific_list{
        max-height: 127px;
        overflow: auto;
    }
    .table>tbody>tr#modal_select_admin_tr_second:nth-child(3)>td:nth-child(3),
    .table>tbody>tr#modal_select_admin_tr_second:nth-child(3)>td:nth-child(2){
        width: 44.8%;
    }

    /*请填写完整信息弹层  删除信息弹层*/
    #department_modal_tip,
    #department_modal_delete{
        width: 15%;
        min-width: 220px;
        z-index: 1051;
    }
    #department_modal_tip .modal-body,
    #department_modal_delete .modal-body{
        text-align: center;
    }
    #department_modal_tip .modal-header,
    #department_modal_delete .modal-header{
        background-color: #FFF;
    }
    #department_modal_tip .modal-body div:nth-child(1){
        margin-top: 1em;
    }
    #department_modal_tip .modal-body div:nth-child(2){
        background-color: #1CC7BD;
        color: #FFF;
        margin: 2em auto 0 auto;
        width: 30%;
        padding: 0.1666666rem 0;
        border-radius: 3px;
    }
    #department_modal_tip .modal-body div:nth-child(2):hover{
        background-color: #18ADA4;
        cursor: pointer;
    }

    /*删除信息弹层*/
    #department_modal_delete .clearfix div{
        border: 1px solid transparent;
        width: 28%;
        border-radius: 3px;
        padding: 0.166666rem 0;
    }
    #department_modal_delete .clearfix div:nth-child(1){
        margin-left: 17%;
        color: #999;
        border-color: #999;
    }
    #department_modal_delete .clearfix div:nth-child(2){
        margin-right: 17%;
        border-color: #1CC7BD;
        background-color: #1CC7BD;
        color: #FFF;
    }
    #department_modal_delete .modal-body>div:nth-child(1){
        margin-top: 1em;
        margin-bottom: 1em;
    }

    /*适配*/
    @media (min-width: 1024px){
        /*18*/
        .define-table-input button{
            line-height: 1.33;
        }
        td.clearfix img{
            width: 0.55rem;
            vertical-align: -1px;
        }
        td.clearfix div:nth-child(3) img{
            width: 0.6rem;
        }
        .table tbody td:nth-child(4) img{
            vertical-align: 0;
        }
        .define-nav-input input{
            line-height: normal;
            font-size: 0.424242rem;
        }
        .table>tbody>tr:nth-child(3)>td:nth-child(3) div{
            padding: 0.3rem 6px;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) div,
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) div{
            width: 92.1%;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) img{
            right: 10px;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) img{
            right: 1px;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) div{
            margin-left: 3.8%;
        }
        .modal .table>tbody>tr:nth-child(3)>td.modal_select_admin_default:nth-child(2) img{
            right: 0;
        }
        .table>tbody>tr#modal_select_admin_tr_second:nth-child(3)>td:nth-child(3),
        .table>tbody>tr#modal_select_admin_tr_second:nth-child(3)>td:nth-child(2){
            width: 42%;
        }
    }
    @media (min-width: 1100px) {
        /*20*/
        .define-table-input button{
            line-height: 1.45;
        }
        td.clearfix img{
            vertical-align: -2px;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) div,
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) div{
            padding: 0.3rem 6px;
        }
        .table>tbody>tr#modal_select_admin_tr_second:nth-child(3)>td:nth-child(3),
        .table>tbody>tr#modal_select_admin_tr_second:nth-child(3)>td:nth-child(2){
            width: 42.9%;
        }
    }
    @media (min-width: 1280px) {
        /*22*/
        .define-table-input button{
            line-height: 1.7;
        }
        td.clearfix img{
            width: 0.5rem;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) img{
            right: 10px;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) img{
            right: 2px;
        }
        .modal .table>tbody>tr:nth-child(3)>td.modal_select_admin_default:nth-child(2) img{
            right: 3px;
        }
    }
    @media (min-width: 1366px) {
        /*24*/
        .define-table-input button{
            line-height: 1.9;
        }
        td.clearfix img{
            width: 0.45rem;
            vertical-align: -1px;
        }
        td.clearfix div:nth-child(3) img{
            width: 0.5rem;
        }
    }
    @media (min-width: 1440px) {
        /*25*/
        .define-table-input button{
            line-height: 1.95;
        }
        td.clearfix div:nth-child(3) img{
            width: 0.45rem;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) img{
            right: 13px;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) img{
            right: 3px;
        }
    }
    @media (min-width: 1680px) {
        /*28*/
        .define-table-input button{
            line-height: 2.2;
        }
        td.clearfix img{
            width: 0.36rem;
            vertical-align: -1px;
        }
        td.clearfix div:nth-child(3) img{
            width: 0.4rem;
        }
        .table tbody td:nth-child(4) img{
            vertical-align: -1px;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) img{
            right: 17px;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) img{
            right: 6px;
        }
        .modal .table>tbody>tr:nth-child(3)>td.modal_select_admin_default:nth-child(2) img{
            right: 6px;
        }
        .table>tbody>tr#modal_select_admin_tr_second:nth-child(3)>td:nth-child(3),
        .table>tbody>tr#modal_select_admin_tr_second:nth-child(3)>td:nth-child(2){
            width: 44%;
        }
    }
    @media (min-width: 1920px) {
        /*33*/
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(2) img{
            right: 22px;
        }
        .modal .table>tbody>tr:nth-child(3)>td:nth-child(3) img{
            right: 9px;
        }
        .modal .table>tbody>tr:nth-child(3)>td.modal_select_admin_default:nth-child(2) img{
            right: 8px;
        }
        .table>tbody>tr#modal_select_admin_tr_second:nth-child(3)>td:nth-child(3),
        .table>tbody>tr#modal_select_admin_tr_second:nth-child(3)>td:nth-child(2){
            width: 44.8%;
        }
    }

</style>

<div class="define">
    <div class="define-nav clearfix">
        <div class="pull-left">科室管理</div>
        <div class="pull-right"><img id="admin_add_people" src="/statics/images/sever_add.png" alt=""></div>
    </div>

    <div style="margin-left: 0.90rem;font-size: 0.424242rem;margin-top: 0.545454rem;margin-bottom: 0.545454rem;">全部结果</div>

    <div class="define-table">
        <table class="table table-hover" id="table_handle">
            <thead>
            <tr>
                <td>序号</td>
                <td>科室名称</td>
                <td>上级科室</td>
                <td>科室领导</td>
                <td>科室电话</td>
                <td>状态</td>
                <td>排序</td>
                <td>操作</td>
            </tr>
            </thead>
            <tbody>
            <?php if($departData){ foreach($departData as $val){ ?>
            <tr>
                <td><?=$val['id']?></td>
                <td><?=$val['de_name']?></td>
                <td><?=$val['parent_id']?$val['parent_name']:'无'?></td>
                <td><?=$val['de_leader']?></td>
                <td><?=$val['de_mobile']?></td>
                <td><?=$val['status']?></td>
                <td><?=$val['sort']?></td>
                <td class="clearfix">
                    <div class="pull-left define_edit"><img src="/statics/images/sever_edit.png" alt="">编辑</div>
                    <div class="pull-left define_delete"><img src="/statics/images/sever_delete_all.png" alt="">删除</div>
                </td>
            </tr>
            <?php }}else{?>
            <tr><td colspan="8" style="text-align:center">暂无数据</td></tr>
            <?php }?>

            </tbody>
        </table>
    </div>

    <!--分页  开始-->
    <div class="define-paging clearfix">
        <div class="pull-left">共8页</div>
        <div class="pull-left" id="the_first_page">首页</div>
        <div class="pull-left" id="prev_page">上一页</div>
        <div class="pull-left define-page define-active">1</div>
        <div class="pull-left define-page">2</div>
        <div class="pull-left define-page">3</div>
        <div class="pull-left define-page">4</div>
        <div class="pull-left define-page">5</div>
        <div class="pull-left" id="next_page">下一页</div>
        <div class="pull-left" id="the_last_page">尾页</div>
    </div>
    <!--分页  结束-->
</div>

<!--信息填写  开始-->
<div class="modal fade" tabindex="-1" role="dialog" id="department_modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <span class="define-modal-close" data-dismiss="modal" aria-label="Close"><img src="/statics/images/sever_close.png" alt=""></span>
                <div class="modal-title">添加人员</div>
            </div>
            <div class="modal-body">
                <div id="modal_table_default" class="active">
                    <table class="table active">
                        <tr>
                            <td><img src="/statics/images/sever_must_write.png" alt=""> 科室名称:</td>
                            <td colspan="2"><input id="default_modal_admin_name" type="text" placeholder="请输入科室名称"></td>
                        </tr>
                        <tr>
                            <td style="height: 0.575757rem"></td>
                        </tr>
                        <tr id="modal_select_admin_tr_default">
                            <td><img src="/statics/images/sever_must_write.png" alt=""> 科室级别:</td>
                            <td class="modal_select_admin_default">
                                <div id="modal_select_admin_please_default" style="width: 98%;color: #C9C8C8;">请选择科室</div>
                                <img src="/statics/images/sever_unretrieve.png" alt="">
                                <div id="modal_select_admin_list_default">
                                    <div>一级科室</div>
                                    <div>二级科室</div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 0.575757rem"></td>
                        </tr>
                        <!--<tr>
                            <td>科室主任:</td>
                            <td colspan="2"><input id="default_modal_head_name" type="text" placeholder="请输入科室主任"></td>
                        </tr>
                        <tr>
                            <td style="height: 0.575757rem"></td>
                        </tr>-->
                        <tr>
                            <td>科室联系电话:</td>
                            <td colspan="2"><input id="default_modal_phone_name" type="text" placeholder="请输入科室联系电话"></td>
                        </tr>
                    </table>
                </div>
                <div id="modal_table_second" class="">
                    <table class="table">
                        <tr>
                            <td><img src="/statics/images/sever_must_write.png" alt=""> 科室名称:</td>
                            <td colspan="2"><input id="second_modal_admin_name" type="text" placeholder="请输入科室名称"></td>
                        </tr>
                        <tr>
                            <td style="height: 0.575757rem"></td>
                        </tr>
                        <tr id="modal_select_admin_tr_second">
                            <td><img src="/statics/images/sever_must_write.png" alt=""> 科室级别:</td>
                            <td>
                                <div id="modal_select_admin_please_second">二级科室</div>
                                <img src="/statics/images/sever_unretrieve.png" alt="">
                                <div id="modal_select_admin_please_second_list">
                                    <div>一级科室</div>
                                    <div class="active">二级科室</div>
                                </div>
                            </td>
                            <td>
                                <div id="modal_select_admin_specific">骨科</div>
                                <img src="/statics/images/sever_unretrieve.png" alt="">
                                <div id="modal_select_admin_specific_list">
                                    <div>骨科</div>
                                    <div>皮肤科</div>
                                    <div>眼科</div>
                                    <div>脑科</div>
                                    <div>耳鼻喉科</div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 0.575757rem"></td>
                        </tr>
                        <!--<tr>
                            <td>科室主任:</td>
                            <td colspan="2"><input id="second_modal_head_name" type="text" placeholder="请输入科室主任"></td>
                        </tr>
                        <tr>
                            <td style="height: 0.575757rem"></td>
                        </tr>-->
                        <tr>
                            <td>科室联系电话:</td>
                            <td colspan="2"><input id="second_modal_phone_name" type="text" placeholder="请输入科室联系电话"></td>
                        </tr>
                    </table>
                </div>
                <div class="clearfix">
                    <div class="pull-left"><div id="modal_resever">重置</div></div>
                    <div class="pull-left"><div id="modal_creat">创建</div></div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--信息填写  结束-->

<!--信息填写提示  开始-->
<div class="modal fade" tabindex="-1" role="dialog" id="department_modal_tip">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <span class="define-modal-close" data-dismiss="modal" aria-label="Close"><img src="/statics/images/sever_close.png" alt=""></span>
                <div class="modal-title">信息</div>
            </div>
            <div class="modal-body">
                <div>请填写完成必填信息！</div>
                <div data-dismiss="modal" aria-label="Close">确定</div>
            </div>
        </div>
    </div>
</div>
<!--信息填写提示  结束-->

<!--删除信息提示框  开始-->
<div class="modal fade" tabindex="-1" role="dialog" id="department_modal_delete">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <span class="define-modal-close" data-dismiss="modal" aria-label="Close"><img src="/statics/images/sever_close.png" alt=""></span>
                <div class="modal-title">提示</div>
            </div>
            <div class="modal-body">
                <div>是否删除该信息？</div>
                <div class="clearfix">
                    <div class="pull-left" data-dismiss="modal" aria-label="Close">取消</div>
                    <div class="pull-right" id="modal_delete_sure">确定</div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--删除信息提示框  结束-->

<!--科室管理  添加人员form表单  开始-->
<form action=" /patient/addPatient" method="post" id="add_depart_form" style="display: none;">
    <input name="depart_name" type="text"><!--科室名称-->
    <input name="depart_level" type="text"><!--科室级别-->
    <input name="depart_next_name" type="text"><!--科室级别为二级  二级科室名称-->
    <input name="depart_phone" type="text"><!--科室联系电话-->
</form>
<!--科室管理  添加人员form表单  结束-->

<script>
    $(document).ready(function () {
        $(window).resize(function () {
            default_first_select_length();//赋值  一级科室及默认弹层  下拉选择框长度赋值
            user_select_admin_second_length();//赋值  赋值长度  选择科室级别
            user_select_admin_second_speci_length();//赋值  赋值长度  选择具体科室

            sure_position_modal_speace($('#department_modal'));//确定  修改弹层的位置  添加人员
            sure_position_modal_speace($('#department_modal_tip'));//确定  修改弹层的位置  添加人员信息填写提示
            sure_position_modal_speace($('#department_modal_delete'));//确定  修改弹层的位置  删除信息
        });

        //设置当前页面选中样式
        setting_style_the_page();
        function setting_style_the_page() {
            var first_menu_item = $('#sidebar-nav').find('a[href="#accounts-menu-first-01"]');//获取一级菜单可点击的a标签
            var img_nav = first_menu_item.find('.define-nav');//获取导航图片
            var img_left = first_menu_item.find('.define-left');//获取转向图片
            var first_ul = $('#accounts-menu-first-01');//获取一级下拉菜单
            var first_ul_li_one = first_ul.children('li').eq(0);//获取  "科室管理"

            first_menu_item.addClass('define-active');//一级菜单添加左边横线
            img_nav.attr('src','/statics/images/sever_hospital_select.png');//切换导航图片
            img_left.addClass('define-rotate-active');//添加动画类
            first_ul.addClass('in');//展拉一级菜单
            first_ul_li_one.addClass('define-active');//li添加左边横线
        }

        //分页切换效果
        page_style_switch();
        function page_style_switch() {
        	var page_ = $('.define-paging');
            var the_first_page = $('#the_first_page');//获取首页
            var prev_page = $('#prev_page');//获取上一页
            var next_page = $('#next_page');//获取下一页
            var the_last_page = $('#the_last_page');//获取尾页

            // 123456
	        page_.delegate('.define-page','click',function () {
                page_.find('.define-page').removeClass('define-active');
		        $(this).addClass('define-active');
	        });

	        // 上一页
	        prev_page.on('click',function () {
                var active_page = page_.find('.define-active');
                if(active_page.text() > 1){
	                page_.find('.define-page').removeClass('define-active');
                	active_page.prev().addClass('define-active')
                }
	        });

	        // 下一页
	        next_page.on('click',function () {
		        var active_page = page_.find('.define-active');
		        if(active_page.text() < 5){
			        page_.find('.define-page').removeClass('define-active');
			        active_page.next().addClass('define-active')
		        }
	        });

	        // 首页
	        the_first_page.on('click',function () {
		        page_.find('.define-page').removeClass('define-active');
		        page_.find('.define-page').eq(0).addClass('define-active');
	        });

	        // 尾页
	        the_last_page.on('click',function () {
		        page_.find('.define-page').removeClass('define-active');
		        page_.find('.define-page').eq(4).addClass('define-active');
	        });

        }

        /*页面*/
        //删除操作
        page_delete();
        function page_delete() {
            var table_handle = $('#table_handle');//获取table
            table_handle.delegate('.define_delete','click',function () {
                sure_position_modal_speace($('#department_modal_delete'));//确定  修改弹层的位置  删除信息
                $('#department_modal_delete').modal({keyboards:false});
                click_btn_delete_handle($(this));//点击确定  执行删除操作
            });
        }

        //点击确定  执行删除操作
        function click_btn_delete_handle($btn) {
            var tr = $btn.parents('tr');
            $('#modal_delete_sure').on('click',function () {
                $('#department_modal_delete').modal('hide');
            });
        }

        /*弹窗*/
        //点击添加按钮  展示信息填写弹窗
        show_department_modal();
        function show_department_modal() {
            $('#admin_add_people').on('click',function () {
                sure_position_modal_speace( $('#department_modal'));//确定  修改弹层的位置
                $('#department_modal').modal({keyboard: false});
            });
        }

        //确定  修正弹层的位置
        function sure_position_modal_speace($modal) {
            var width = $modal.outerWidth();
            var height = $modal.outerHeight();
            var window_width = $(window).width();
            var window_height = $(window).height();

            var left = ( 100 - ( width / window_width ) * 100 ) / 2 + '%';
            var top = ( 100 - ( height / window_height ) * 100 ) / 2 + '%';

            $modal.css( 'left' , left  );
            $modal.css( 'top' , top );

        }

        /***********************************  一级科室  ************************************/
        //用户选择    点击请选择科室  一级科室
        user_select_admin_click();
        function user_select_admin_click() {
            var select = $('#modal_select_admin_list_default');//获取下拉框
            $('#modal_select_admin_please_default').on('click',function () {
                default_first_select_length();//赋值  一级科室及默认弹层  下拉选择框长度赋值
                select.animate({
                    height: 'toggle'
                },500);
                if($('#modal_select_admin_list_default').hasClass('active')){
                    default_first_select_border_show();//添加圆角  点击选择框
                    default_first_select_hide();//隐藏   一级科室下拉选择框
                }else {
                    default_first_select_border_hide();//去除圆角  点击选择框
                    default_first_select_show();//显示   一级科室下拉选择框
                }
                default_first_select_img_switch();//修改导航图片   一级科室
            });
        }

        //用户选择  选择科室  一级科室
        user_select_admin();
        function user_select_admin() {
            var btn = $('#modal_select_admin_please_default');//获取选择框
            $('#modal_select_admin_list_default').delegate('div','click',function(){
                var self = $(this);
                //default_second_input_val();//赋值  已填选项进行赋值
                $('#modal_select_admin_list_default').animate({
                    height: 'toggle'
                },500,function () {
                    if( self.text() == '一级科室' ){
                        $('#modal_table_second').removeClass('active');//隐藏二级科室
                        $('#modal_table_default').addClass('active');//展示一级科室
                        btn.text(self.text());//展示选择
                        btn.css('color','#333');//更改字体色值
                    }

                    if( self.text() == '二级科室' ){
                        $('#modal_table_default').removeClass('active');//隐藏一级科室
                        $('#modal_table_second').addClass('active');//展示二级科室
                    }
                });

                if( self.text() == '一级科室' ){
                    default_first_select_hide();//隐藏   一级科室下拉选择框
                    default_first_select_border_show();//添加圆角  点击选择框
                    $(this).addClass('active');//当前项添加选中活动类
                }

                if( self.text() == '二级科室' ){
                    default_first_select_hide();//隐藏   一级科室下拉选择框
                    default_first_select_border_show();//添加圆角  点击选择框
                }

                default_first_select_img_switch();//修改导航图片   一级科室
            });
        }

        //赋值  一级科室及默认弹层  下拉选择框长度赋值
        function default_first_select_length() {
            $('#modal_select_admin_list_default').width( $('#modal_select_admin_please_default').outerWidth() - 2 )
        }

        //去除圆角  点击选择框  一级科室
        function default_first_select_border_hide() {
            $('#modal_select_admin_please_default').css('borderBottomLeftRadius','0');
            $('#modal_select_admin_please_default').css('borderBottomRightRadius','0');
        }

        //添加圆角  点击选择框  一级科室
        function default_first_select_border_show() {
            $('#modal_select_admin_please_default').css('borderBottomLeftRadius','3px');
            $('#modal_select_admin_please_default').css('borderBottomRightRadius','3px');
        }

        //修改导航图片   一级科室
        function default_first_select_img_switch() {
            if( $('#modal_select_admin_list_default').hasClass('active') ){
                $('#modal_select_admin_please_default').next().attr('src','/statics/images/sever_retrieve.png')
            }else {
                $('#modal_select_admin_please_default').next().attr('src','/statics/images/sever_unretrieve.png')
            }
        }

        //显示   一级科室下拉选择框
        function default_first_select_show() {
            $('#modal_select_admin_list_default').addClass('active');
        }

        //隐藏   一级科室下拉选择框
        function default_first_select_hide() {
            $('#modal_select_admin_list_default').removeClass('active');
        }

        /***********************************  二级科室  选择科室级别  ************************************/
        //选择科室  二级科室  点击展示选择框
        user_select_admin_second_click();
        function user_select_admin_second_click() {
            var select = $('#modal_select_admin_please_second_list');
            $('#modal_select_admin_please_second').on('click',function () {
                user_select_admin_second_length();//赋值  赋值长度  选择科室级别
                default_second_select_img_switch();//修改  导航图片  选择科室级别
                select.animate({
                    height: 'toggle'
                },500);
                if(select.hasClass('active')){
                    default_second_select_hide();//隐藏  二级科室选择  下拉选择框
                    default_second_select_border_show();//点击框  添加圆角  选择科室级别
                }else {
                    default_second_select_show();//展示  二级科室选择  下拉选择框
                    default_second_select_border_hide();//点击框  移除圆角  选择科室级别
                }
            })
        }

        //选择科室  二级科室  进行选择
        user_select_admin_second();
        function user_select_admin_second() {
            $('#modal_select_admin_please_second_list').delegate('div','click',function () {
                var self = $(this);
                //default_second_input_val();//赋值  已填选项进行赋值
                default_second_select_img_switch();//修改  导航图片  选择科室级别
                $('#modal_select_admin_please_second_list').animate({
                    height: 'toggle'
                },500,function () {
                    if(self.text() == '一级科室'){
                        $('#modal_table_second').removeClass('active');//隐藏二级科室
                        $('#modal_table_default').addClass('active');//展示一级科室
                    }
                    if(self.text() == '二级科室'){
                        $('#modal_table_default').removeClass('active');//隐藏一级科室
                        $('#modal_table_second').addClass('active');//展示二级科室
                    }
                });
                if($(this).text() == '一级科室'){
                    $('#modal_select_admin_please_default').css('color','#333');//一级科室  修改字体色值
                    $('#modal_select_admin_please_default').text('一级科室');//一级科室  修改字体色值
                    $('#modal_select_admin_list_default').find('div').eq(0).addClass('active');//添加活动样式类
                }
                default_second_select_hide();//隐藏  二级科室选择  下拉选择框
                default_second_select_border_show();//点击框  添加圆角  选择科室级别
            })
        }

        //赋值  赋值长度  选择科室级别
        function user_select_admin_second_length() {
            $('#modal_select_admin_please_second_list').width( $('#modal_select_admin_please_second').outerWidth() - 2 );
        }

        //点击框  添加圆角  选择科室级别
        function default_second_select_border_show() {
            $('#modal_select_admin_please_second').css('borderBottomLeftRadius','3px');
            $('#modal_select_admin_please_second').css('borderBottomRightRadius','3px');
        }

        //点击框  移除圆角  选择科室级别
        function default_second_select_border_hide() {
            $('#modal_select_admin_please_second').css('borderBottomLeftRadius','0');
            $('#modal_select_admin_please_second').css('borderBottomRightRadius','0');
        }

        //展示  二级科室选择  下拉选择框
        function default_second_select_show() {
            $('#modal_select_admin_please_second_list').addClass('active');
        }

        //隐藏  二级科室选择  下拉选择框
        function default_second_select_hide() {
            $('#modal_select_admin_please_second_list').removeClass('active');
        }

        //修改  导航图片  选择科室级别
        function default_second_select_img_switch() {
            if($('#modal_select_admin_please_second_list').hasClass('active')){
                $('#modal_select_admin_please_second').next().attr('src','/statics/images/sever_unretrieve.png');
            }else {
                $('#modal_select_admin_please_second').next().attr('src','/statics/images/sever_retrieve.png');
            }
        }

        /***********************************  二级科室  选择具体科室  ************************************/
        //选择科室  选择具体科室  点击展示选择框
        user_select_admin_second_speci_click();
        function user_select_admin_second_speci_click() {
            var select = $('#modal_select_admin_specific_list');
            $('#modal_select_admin_specific').on('click',function () {
                user_select_admin_second_speci_length();//赋值  赋值长度  选择具体科室
                default_second_select_img_switch_speci();//修改  导航图片  选择具体科室
                select.animate({
                    height: 'toggle'
                },500);
                if(select.hasClass('active')){
                    default_second_select_hide_speci();//隐藏  选择具体科室  下拉选择框
                    default_second_select_border_show_speci();//点击框  添加圆角  选择具体科室
                }else {
                    default_second_select_show_speci();//展示  选择具体科室  下拉选择框
                    default_second_select_border_hide_speci();//点击框  移除圆角  选择具体科室
                }
            })
        }

        //选择科室  选择具体科室  进行选择
        user_select_admin_second_speci();
        function user_select_admin_second_speci() {
            $('#modal_select_admin_specific_list').delegate('div','click',function () {
                $('#modal_select_admin_specific_list').animate({
                    height: 'toggle'
                },500);
                default_second_select_img_switch_speci();//修改  导航图片  选择科室级别
                $('#modal_select_admin_specific').text( $(this).text() );//展示用户选择项
                default_second_select_hide_speci();//隐藏  选择具体科室  下拉选择框
                default_second_select_border_show_speci();//点击框  添加圆角  选择具体科室

                $(this).parent().find('div').removeClass('active');//删除所有活动类
                $(this).addClass('active');//当前项添加活动类
            })
        }

        //赋值  赋值长度  选择具体科室
        function user_select_admin_second_speci_length() {
            $('#modal_select_admin_specific_list').width( $('#modal_select_admin_specific').outerWidth() - 2 );
        }

        //点击框  添加圆角  选择具体科室
        function default_second_select_border_show_speci() {
            $('#modal_select_admin_specific').css('borderBottomLeftRadius','3px');
            $('#modal_select_admin_specific').css('borderBottomRightRadius','3px');
        }

        //点击框  移除圆角  选择具体科室
        function default_second_select_border_hide_speci() {
            $('#modal_select_admin_specific').css('borderBottomLeftRadius','0');
            $('#modal_select_admin_specific').css('borderBottomRightRadius','0');
        }

        //展示  选择具体科室  下拉选择框
        function default_second_select_show_speci() {
            $('#modal_select_admin_specific_list').addClass('active');
        }

        //隐藏  选择具体科室  下拉选择框
        function default_second_select_hide_speci() {
            $('#modal_select_admin_specific_list').removeClass('active');
        }

        //修改  导航图片  选择具体科室
        function default_second_select_img_switch_speci() {
            if($('#modal_select_admin_specific_list').hasClass('active')){
                $('#modal_select_admin_specific').next().attr('src','/statics/images/sever_unretrieve.png');
            }else {
                $('#modal_select_admin_specific').next().attr('src','/statics/images/sever_retrieve.png');
            }
        }

        //赋值  已填选项进行赋值
        function default_second_input_val() {
            //一级科室
            var modal_table_default = $('#modal_table_default');//一级科室
            var default_modal_admin_name = $('#default_modal_admin_name');//科室名称
            var default_modal_head_name = $('#default_modal_head_name');//科室主任
            var default_modal_phone_name = $('#default_modal_phone_name');//科室联系电话

            //二级科室
            var modal_table_second = $('#modal_table_second');//二级科室
            var second_modal_admin_name = $('#second_modal_admin_name');//科室名称
            var second_modal_head_name = $('#second_modal_head_name');//科室主任
            var second_modal_phone_name = $('#second_modal_phone_name');//科室联系电话

            if( modal_table_default.hasClass('active') ){
                second_modal_admin_name.val( default_modal_admin_name.val() );
                second_modal_head_name.val( default_modal_head_name.val() );
                second_modal_phone_name.val( default_modal_phone_name.val() );
            }

            if( modal_table_second.hasClass('active') ){
                default_modal_admin_name.val( second_modal_admin_name.val() );
                default_modal_head_name.val( second_modal_head_name.val() );
                default_modal_phone_name.val( second_modal_phone_name.val() );
            }
        }

        /***********************************  字段填写丢失提示弹层  ************************************/
        //填写验证  验证必填项是否填写
        function verify_must_write() {
            //一级科室
            var modal_table_default = $('#modal_table_default');//一级科室
            var default_modal_admin_name = $('#default_modal_admin_name').val();//科室名称
            var modal_select_admin_please_default = $('#modal_select_admin_please_default').text();//科室选择

            //二级科室
            var modal_table_second = $('#modal_table_second');//二级科室
            var second_modal_admin_name = $('#second_modal_admin_name').val();//科室名称

            //当前选中为一级科室
            if( modal_table_default.hasClass('active') ){
                if( default_modal_admin_name == '' || modal_select_admin_please_default == '请选择科室' ){
                    sure_position_modal_speace($('#department_modal_tip'));//确定  修改弹层的位置
                    $('#department_modal_tip').modal({keyboard: false});
                    $('body').children('.modal-backdrop:last-child').css('zIndex','1050');//修改弹层层级
                }else {
                    modal_creat_user('1');//创建功能
                }
            }

            //当前选中为二级科室
            if( modal_table_second.hasClass('active') ){
                if( second_modal_admin_name == '' ){
                    sure_position_modal_speace($('#department_modal_tip'));//确定  修改弹层的位置
                    $('#department_modal_tip').modal({keyboard: false});
                    $('body').children('.modal-backdrop:last-child').css('zIndex','1050');//修改弹层层级
                }else {
                    modal_creat_user('2');//创建功能
                }
            }
        }

        //点击创建按钮  展示信息提示弹窗
        show_department_modal_tip();
        function show_department_modal_tip() {
            $('#modal_creat').on('click',function () {
                verify_must_write();//填写验证  验证必填项是否填写
            });
        }

        /***********************************  重置功能  ************************************/
        modal_reset();
        function modal_reset() {
            var modal_table_default = $('#modal_table_default');
            var modal_table_second = $('#modal_table_second');
            var modal_resever = $('#modal_resever');//重置按钮

            modal_resever.on('click',function () {
                //一级科室
                if( modal_table_default.hasClass('active') ){
                    modal_table_default.find('input').val('');
                }

                //二级科室
                if( modal_table_second.hasClass('active') ){
                    modal_table_second.find('input').val('');
                }
            });
        }

        /***********************************  创建功能  ************************************/
        function modal_creat_user($modal_level) {
            var add_depart_form = $('#add_depart_form');//form表单

            //一级科室
            var default_modal_admin_name = $('#default_modal_admin_name');//科室名称
            var modal_select_admin_please_default = $('#modal_select_admin_please_default');//科室级别
            var default_modal_phone_name = $('#default_modal_phone_name');//科室联系电话

            //二级科室
            var second_modal_admin_name = $('#second_modal_admin_name');//科室名称
            var modal_select_admin_please_second = $('#modal_select_admin_please_second');//科室级别
            var modal_select_admin_specific = $('#modal_select_admin_specific');//二级科室名称
            var second_modal_phone_name = $('#second_modal_phone_name');//科室联系电话

            if($modal_level == '1'){
                add_depart_form.find('input[name="depart_name"]').val( default_modal_admin_name.val() );
                add_depart_form.find('input[name="depart_level"]').val( modal_select_admin_please_default.text() );
                add_depart_form.find('input[name="depart_phone"]').val( default_modal_phone_name.val() );
            }

            if($modal_level == '2'){
                add_depart_form.find('input[name="depart_name"]').val( second_modal_admin_name.val() );
                add_depart_form.find('input[name="depart_level"]').val( modal_select_admin_please_second.text() );
                add_depart_form.find('input[name="depart_next_name"]').val( modal_select_admin_specific.text() );
                add_depart_form.find('input[name="depart_phone"]').val( second_modal_phone_name.val() );
            }

            add_depart_form.submit();
        }

    });
</script>
 <script>loadCent('80%',100);</script>
 <?php if($isLogin && !I('get.ifm')){?>

            </div>
        </div>
    </div>
	<script type="text/html" id="notice">
		<div class="alert alert-info" style="display:none;margin:1px 0 5px 0;">
     	   	<button type="button" class="close" data-dismiss="alert">×</button>
     	   	<strong>温馨提示:</strong> <span class="maintips"></span>
   	 	</div>
	</script>
	<script src="/statics/lib/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            if($.cookie('_sysdomain')){
            	var cookiePars = $.cookie('_sysdomain');
            	parmComb = cookiePars.split('@');
            	$('.row-fluid:first').prepend($('#notice').html());
            	$('.alert .maintips').html(parmComb[0]);
            	$('.alert').show(10,function(){
            			$.cookie('_sysdomain',null,{'path':'/'});
	            		setTimeout(function(){
	            			$('.alert').slideUp(600,function(){
	            				$('.alert').remove();
	            			});
	            			var list = window.parent.art.dialog.list;
	            			if(parmComb[1] != '0')
	            				window.parent.location = parmComb[1];
	            			else
	            				window.parent.location.reload();
	            			list['TIPCHOSEID'].close();
	            		},2000);
            		});
            }
        });
        $(function(){
        	$('.ifrm').live('click',function(){
        		opens($(this).data('url'),$(this).data('width'),$(this).data('height'),$(this).data('title'),$(this).data('params'));
        		return false;
        	});
        	$('.ifrm').each(function(){
           		$(this).attr('title',$(this).data('title'));
           	});
        	<?php if(!isset($_SESSION['tj_life']) || (time()-$_SESSION['tj_life'] > 3600)){?>
		   		//$.get('/index/getCountCj',{},function(){});
		   	<?php }?>
        })
    </script>
  </body>
</html>
<?php }else{?>
            </div>
        </div>
    </div>
	<script src="/statics/lib/bootstrap/js/bootstrap.js"></script>
	<script type="text/html" id="notice">
		<div class="alert alert-info" style="display:none;margin:1px 0 5px 0;">
     	   	<button type="button" class="close" data-dismiss="alert">×</button>
     	   	<strong>温馨提示:</strong> <span class="maintips"></span>
   	 	</div>
	</script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            if($.cookie('_sysdomain')){
            	var cookiePars = $.cookie('_sysdomain');
            	parmComb = cookiePars.split('@');
            	$('.row-fluid:first').prepend($('#notice').html());
            	$('.alert .maintips').html(parmComb[0]);
            	$('.alert').show(10,function(){
            			$.cookie('_sysdomain',null,{'path':'/'});
            			$.cookie('_sysdomain',null);
                		setTimeout(function(){
                			$('.alert').slideUp(600,function(){
                				$('.alert').remove();
    	            			var list = window.parent.art.dialog.list;
    	            			if(parmComb[1] != '0')
    	            				window.parent.location = parmComb[1];
    	            			else
    	            				window.parent.location.reload();
    	            			list['TIPCHOSEID'].close();
                			});
                		},2000);
            		});
            }
           	$('.ifrm').click(function(){
        		opens($(this).data('url'),$(this).data('width'),$(this).data('height'),$(this).data('title'),$(this).data('params'));
        		return false;
        	});
           	$('.ifrm').each(function(){
           		$(this).attr('title',$(this).data('title'));
           	});
        	<?php if(!isset($_SESSION['tj_life']) || (time()-$_SESSION['tj_life'] > 3600)){?>
		   		//$.get('/index/getCountCj',{},function(){});
		   	<?php }?>
        })
    </script>
  </body>
</html>
<?php }?>
<script>loadCent('100%',100);setTimeout(function(){$('#loadIngCent').fadeOut('fast')},800);</script>